function urlParse(param, url) {
  if (!url) url = location.search || "";
  var keys = {};
  url.replace(/([^=&?]+)=([^&#]*)/g, function(m, key, value) {
    keys[decodeURIComponent(key)] = decodeURIComponent(value);
  });
  return (param ? keys[param] : keys) ||
    "view" == param && document.body.id;
}

function SplitMessage(longmsg, chunklength) {
var formattedtext = ""
var splitmsg = longmsg.split(chunklength);

for(i = 0; i < splitmsg.length; i++){
	formattedtext += splitmsg[i]+"\n"; 
}
return formattedtext;
}
